home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Examples
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "LED Examples"
- ClientHeight = 5265
- ClientLeft = 1440
- ClientTop = 2145
- ClientWidth = 6855
- Height = 5670
- Left = 1380
- LinkTopic = "Form1"
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 351
- ScaleMode = 3 'Pixel
- ScaleWidth = 457
- Top = 1800
- Width = 6975
- Begin LED LED8
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 225
- LEDHeight = 15
- LEDIndex = 0
- LEDSep = 3
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 30
- Left = 240
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 7
- OffPictureGreen = LEDTEST.FRX:0000
- OnPictureGreen = LEDTEST.FRX:070A
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 16
- Top = 2790
- Value = 240
- Width = 3420
- ZLoad = LEDTEST.FRX:0914
- End
- Begin LED LED2
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 3
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 360
- LEDHeight = 20
- LEDIndex = 0
- LEDSep = 2
- LEDStyle = 1 ' 1 - Circular
- LEDWidth = 20
- Left = 270
- MaxDecay = 0 'False
- Mode = 0 ' 0 - Value
- MouseControl = -1 'True
- NumLEDs = 10
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 12
- Top = 1620
- Value = 4
- Width = 3330
- ZLoad = LEDTEST.FRX:09DC
- End
- Begin Timer Timer2
- Interval = 400
- Left = 90
- Top = 660
- End
- Begin LED LED10
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 450
- LEDHeight = 30
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 15
- Left = 270
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = 0 'False
- NumLEDs = 15
- OffPictureGreen = LEDTEST.FRX:0AA4
- OffPictureRed = LEDTEST.FRX:0CC2
- OffPictureYellow= LEDTEST.FRX:0EE0
- OnPictureGreen = LEDTEST.FRX:10FE
- OnPictureRed = LEDTEST.FRX:131C
- OnPictureYellow = LEDTEST.FRX:153A
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 11
- Top = 2310
- Value = 32767
- Width = 3375
- ZLoad = LEDTEST.FRX:1758
- End
- Begin LED LED9
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 450
- LEDHeight = 30
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 15
- Left = 270
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 15
- OffPictureRed = LEDTEST.FRX:1820
- OnPictureRed = LEDTEST.FRX:1A3E
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 10
- Top = 3030
- Value = 255
- Width = 3375
- ZLoad = LEDTEST.FRX:1C5C
- End
- Begin LED LED7
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 1 ' 1 - Raised
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 630
- Index = 3
- LEDHeight = 30
- LEDIndex = 0
- LEDSep = 10
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 30
- Left = 2760
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 1
- OffPictureRed = LEDTEST.FRX:1D24
- OnPictureRed = LEDTEST.FRX:1EEE
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 9
- Top = 330
- Value = 0
- Width = 630
- ZLoad = LEDTEST.FRX:20B8
- End
- Begin LED LED7
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 0
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 600
- Index = 2
- LEDHeight = 40
- LEDIndex = 0
- LEDSep = 10
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 40
- Left = 1950
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 1
- OffPictureRed = LEDTEST.FRX:2180
- OnPictureRed = LEDTEST.FRX:24DE
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 8
- Top = 360
- Value = 0
- Width = 600
- ZLoad = LEDTEST.FRX:283C
- End
- Begin LED LED7
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 2 ' 2 - Inset
- BevelOuter = 1 ' 1 - Raised
- BevelWidth = 2
- BorderHorizontal= 5
- BorderVertical = 5
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 630
- Index = 1
- LEDHeight = 20
- LEDIndex = 0
- LEDSep = 10
- LEDStyle = 1 ' 1 - Circular
- LEDWidth = 20
- Left = 1170
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 1
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 7
- Top = 330
- Value = 0
- Width = 630
- ZLoad = LEDTEST.FRX:2904
- End
- Begin LED LED7
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 2 ' 2 - Inset
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 2
- BorderHorizontal= 5
- BorderVertical = 5
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 630
- Index = 0
- LEDHeight = 20
- LEDIndex = 0
- LEDSep = 10
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 20
- Left = 390
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 1
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 6
- Top = 330
- Value = 0
- Width = 630
- ZLoad = LEDTEST.FRX:29CC
- End
- Begin LED LED4
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 3
- BorderHorizontal= 0
- BorderVertical = 0
- BorderWidth = 2
- DecayRate = 0
- Direction = 1 ' 1 - Backward
- Height = 360
- LEDHeight = 20
- LEDIndex = 0
- LEDSep = 2
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 20
- Left = 270
- MaxDecay = 0 'False
- Mode = 0 ' 0 - Value
- MouseControl = -1 'True
- NumLEDs = 10
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 5
- Top = 1260
- Value = 4
- Width = 3330
- ZLoad = LEDTEST.FRX:2A94
- End
- Begin LED LED6
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 1 ' 1 - Raised
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 1
- BorderHorizontal= 13
- BorderVertical = 4
- BorderWidth = 0
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 780
- LEDHeight = 40
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 20
- Left = 930
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 16
- OffPictureRed = LEDTEST.FRX:2B5C
- OnPictureRed = LEDTEST.FRX:2DB6
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 4
- Top = 4350
- Value = 9876
- Width = 5250
- ZLoad = LEDTEST.FRX:3010
- End
- Begin Frame Frame4
- BackColor = &H00C0C0C0&
- Caption = "Max Decay Ex."
- Height = 3405
- Left = 4950
- TabIndex = 2
- Top = 60
- Width = 1695
- Begin LED LED5
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 2
- BorderVertical = 2
- BorderWidth = 2
- DecayRate = 100
- Direction = 1 ' 1 - Backward
- Height = 3000
- Index = 3
- LEDHeight = 6
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 15
- Left = 1140
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = 0 'False
- NumLEDs = 32
- Orientation = 1 ' 1 - Vertical
- TabIndex = 15
- Top = 300
- Value = 0
- Width = 345
- ZLoad = LEDTEST.FRX:30D8
- End
- Begin LED LED5
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 2
- BorderVertical = 2
- BorderWidth = 2
- DecayRate = 100
- Direction = 1 ' 1 - Backward
- Height = 3000
- Index = 2
- LEDHeight = 6
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 15
- Left = 840
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = 0 'False
- NumLEDs = 32
- Orientation = 1 ' 1 - Vertical
- TabIndex = 14
- Top = 300
- Value = 0
- Width = 345
- ZLoad = LEDTEST.FRX:31A0
- End
- Begin LED LED5
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 2
- BorderVertical = 2
- BorderWidth = 2
- DecayRate = 100
- Direction = 1 ' 1 - Backward
- Height = 3000
- Index = 1
- LEDHeight = 6
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 15
- Left = 540
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = 0 'False
- NumLEDs = 32
- Orientation = 1 ' 1 - Vertical
- TabIndex = 13
- Top = 300
- Value = 0
- Width = 345
- ZLoad = LEDTEST.FRX:3268
- End
- Begin LED LED5
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 2
- BorderHorizontal= 2
- BorderVertical = 2
- BorderWidth = 2
- DecayRate = 100
- Direction = 1 ' 1 - Backward
- Height = 3000
- Index = 0
- LEDHeight = 6
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 15
- Left = 240
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = 0 'False
- NumLEDs = 32
- Orientation = 1 ' 1 - Vertical
- TabIndex = 3
- Top = 300
- Value = 0
- Width = 345
- ZLoad = LEDTEST.FRX:3330
- End
- End
- Begin Timer Timer1
- Interval = 150
- Left = 90
- Top = 180
- End
- Begin LED LED3
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 0 ' 0 - None
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 2
- BorderHorizontal= 0
- BorderVertical = 2
- BorderWidth = 0
- DecayRate = 60
- Direction = 0 ' 0 - Forward
- Height = 510
- LEDHeight = 26
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 23
- Left = 930
- MaxDecay = -1 'True
- Mode = 0 ' 0 - Value
- MouseControl = -1 'True
- NumLEDs = 15
- OffPictureGreen = LEDTEST.FRX:33F8
- OffPictureRed = LEDTEST.FRX:35C2
- OffPictureYellow= LEDTEST.FRX:378C
- OnPictureGreen = LEDTEST.FRX:3956
- OnPictureRed = LEDTEST.FRX:3B20
- OnPictureYellow = LEDTEST.FRX:3CEA
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 1
- Top = 3720
- Value = 20
- Width = 5235
- ZLoad = LEDTEST.FRX:3EB4
- End
- Begin LED LED1
- AutoRedraw = -1 'True
- AutoSize = 0 ' 0 - None
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BackgroundPicture= LEDTEST.FRX:3F7C
- BevelInner = 0 ' 0 - None
- BevelOuter = 0 ' 0 - None
- BevelWidth = 0
- BorderHorizontal= 18
- BorderVertical = 0
- BorderWidth = 3
- DecayRate = 30
- Direction = 1 ' 1 - Backward
- Height = 3348
- LEDHeight = 12
- LEDIndex = 0
- LEDSep = 0
- LEDStyle = 0 ' 0 - Rectangular
- LEDWidth = 9
- Left = 3960
- MaxDecay = 0 'False
- Mode = 0 ' 0 - Value
- MouseControl = -1 'True
- NumLEDs = 15
- Orientation = 1 ' 1 - Vertical
- TabIndex = 0
- Top = 120
- Value = 7
- Width = 732
- ZLoad = LEDTEST.FRX:4E42
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Try clicking or sliding the LEDs"
- Height = 195
- Left = 450
- TabIndex = 17
- Top = 30
- Width = 2715
- End
- Dim theta(5) As Single
- Dim rates(5) As Single
- Sub Form_Load ()
- Randomize
- For i = 0 To 4
- theta(i) = Rnd(1) * 3.14159
- rates(i) = .2 * Rnd(1)
- Next
- End Sub
- Sub LED2_Click ()
- led4 = led2
- End Sub
- Sub LED4_Click ()
- led2 = led4
- End Sub
- Sub Timer1_Timer ()
- For i = 0 To 3
- Randomize
- led5(i) = 32 * Sin(theta(i)) ^ 2
- theta(i) = theta(i) + rates(i)
- Next
- End Sub
- Sub Timer2_Timer ()
- led10 = Rnd(1) * 32767
- End Sub
-